{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 引入需要用的库\n",
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "from sklearn.linear_model import LinearRegression   # 导入线性回归\n",
    "from sklearn.model_selection import KFold  # 导入交叉验证\n",
    "from sklearn.linear_model import LogisticRegression     # 导入逻辑验证\n",
    "from sklearn.ensemble import RandomForestClassifier     # 导入随机森林\n",
    "from sklearn.feature_selection import SelectKBest, f_classif    # 选择最佳特征\n",
    "import re\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入数据\n",
    "train = pd.read_csv(\"train.csv\")\n",
    "test = pd.read_csv(\"test.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Name</th>\n",
       "      <th>Sex</th>\n",
       "      <th>Age</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Parch</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Braund, Mr. Owen Harris</td>\n",
       "      <td>male</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>A/5 21171</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n",
       "      <td>female</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>PC 17599</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>C85</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>Heikkinen, Miss. Laina</td>\n",
       "      <td>female</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>STON/O2. 3101282</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n",
       "      <td>female</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>113803</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>C123</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Allen, Mr. William Henry</td>\n",
       "      <td>male</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>373450</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   PassengerId  Survived  Pclass  \\\n",
       "0            1         0       3   \n",
       "1            2         1       1   \n",
       "2            3         1       3   \n",
       "3            4         1       1   \n",
       "4            5         0       3   \n",
       "\n",
       "                                                Name     Sex   Age  SibSp  \\\n",
       "0                            Braund, Mr. Owen Harris    male  22.0      1   \n",
       "1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0      1   \n",
       "2                             Heikkinen, Miss. Laina  female  26.0      0   \n",
       "3       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0      1   \n",
       "4                           Allen, Mr. William Henry    male  35.0      0   \n",
       "\n",
       "   Parch            Ticket     Fare Cabin Embarked  \n",
       "0      0         A/5 21171   7.2500   NaN        S  \n",
       "1      0          PC 17599  71.2833   C85        C  \n",
       "2      0  STON/O2. 3101282   7.9250   NaN        S  \n",
       "3      0            113803  53.1000  C123        S  \n",
       "4      0            373450   8.0500   NaN        S  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Name</th>\n",
       "      <th>Sex</th>\n",
       "      <th>Age</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Parch</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>892</td>\n",
       "      <td>3</td>\n",
       "      <td>Kelly, Mr. James</td>\n",
       "      <td>male</td>\n",
       "      <td>34.5</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>330911</td>\n",
       "      <td>7.8292</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Q</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>893</td>\n",
       "      <td>3</td>\n",
       "      <td>Wilkes, Mrs. James (Ellen Needs)</td>\n",
       "      <td>female</td>\n",
       "      <td>47.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>363272</td>\n",
       "      <td>7.0000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>894</td>\n",
       "      <td>2</td>\n",
       "      <td>Myles, Mr. Thomas Francis</td>\n",
       "      <td>male</td>\n",
       "      <td>62.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>240276</td>\n",
       "      <td>9.6875</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Q</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>895</td>\n",
       "      <td>3</td>\n",
       "      <td>Wirz, Mr. Albert</td>\n",
       "      <td>male</td>\n",
       "      <td>27.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>315154</td>\n",
       "      <td>8.6625</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>896</td>\n",
       "      <td>3</td>\n",
       "      <td>Hirvonen, Mrs. Alexander (Helga E Lindqvist)</td>\n",
       "      <td>female</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3101298</td>\n",
       "      <td>12.2875</td>\n",
       "      <td>NaN</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   PassengerId  Pclass                                          Name     Sex  \\\n",
       "0          892       3                              Kelly, Mr. James    male   \n",
       "1          893       3              Wilkes, Mrs. James (Ellen Needs)  female   \n",
       "2          894       2                     Myles, Mr. Thomas Francis    male   \n",
       "3          895       3                              Wirz, Mr. Albert    male   \n",
       "4          896       3  Hirvonen, Mrs. Alexander (Helga E Lindqvist)  female   \n",
       "\n",
       "    Age  SibSp  Parch   Ticket     Fare Cabin Embarked  \n",
       "0  34.5      0      0   330911   7.8292   NaN        Q  \n",
       "1  47.0      1      0   363272   7.0000   NaN        S  \n",
       "2  62.0      0      0   240276   9.6875   NaN        Q  \n",
       "3  27.0      0      0   315154   8.6625   NaN        S  \n",
       "4  22.0      1      1  3101298  12.2875   NaN        S  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Age</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Parch</th>\n",
       "      <th>Fare</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>714.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "      <td>891.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>446.000000</td>\n",
       "      <td>0.383838</td>\n",
       "      <td>2.308642</td>\n",
       "      <td>29.699118</td>\n",
       "      <td>0.523008</td>\n",
       "      <td>0.381594</td>\n",
       "      <td>32.204208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>257.353842</td>\n",
       "      <td>0.486592</td>\n",
       "      <td>0.836071</td>\n",
       "      <td>14.526497</td>\n",
       "      <td>1.102743</td>\n",
       "      <td>0.806057</td>\n",
       "      <td>49.693429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.420000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>223.500000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>20.125000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>7.910400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>446.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>28.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>14.454200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>668.500000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>38.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>31.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>891.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>512.329200</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       PassengerId    Survived      Pclass         Age       SibSp  \\\n",
       "count   891.000000  891.000000  891.000000  714.000000  891.000000   \n",
       "mean    446.000000    0.383838    2.308642   29.699118    0.523008   \n",
       "std     257.353842    0.486592    0.836071   14.526497    1.102743   \n",
       "min       1.000000    0.000000    1.000000    0.420000    0.000000   \n",
       "25%     223.500000    0.000000    2.000000   20.125000    0.000000   \n",
       "50%     446.000000    0.000000    3.000000   28.000000    0.000000   \n",
       "75%     668.500000    1.000000    3.000000   38.000000    1.000000   \n",
       "max     891.000000    1.000000    3.000000   80.000000    8.000000   \n",
       "\n",
       "            Parch        Fare  \n",
       "count  891.000000  891.000000  \n",
       "mean     0.381594   32.204208  \n",
       "std      0.806057   49.693429  \n",
       "min      0.000000    0.000000  \n",
       "25%      0.000000    7.910400  \n",
       "50%      0.000000   14.454200  \n",
       "75%      0.000000   31.000000  \n",
       "max      6.000000  512.329200  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 891 entries, 0 to 890\n",
      "Data columns (total 12 columns):\n",
      "PassengerId    891 non-null int64\n",
      "Survived       891 non-null int64\n",
      "Pclass         891 non-null int64\n",
      "Name           891 non-null object\n",
      "Sex            891 non-null object\n",
      "Age            714 non-null float64\n",
      "SibSp          891 non-null int64\n",
      "Parch          891 non-null int64\n",
      "Ticket         891 non-null object\n",
      "Fare           891 non-null float64\n",
      "Cabin          204 non-null object\n",
      "Embarked       889 non-null object\n",
      "dtypes: float64(2), int64(5), object(5)\n",
      "memory usage: 83.6+ KB\n"
     ]
    }
   ],
   "source": [
    "train.info()  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 418 entries, 0 to 417\n",
      "Data columns (total 11 columns):\n",
      "PassengerId    418 non-null int64\n",
      "Pclass         418 non-null int64\n",
      "Name           418 non-null object\n",
      "Sex            418 non-null object\n",
      "Age            332 non-null float64\n",
      "SibSp          418 non-null int64\n",
      "Parch          418 non-null int64\n",
      "Ticket         418 non-null object\n",
      "Fare           417 non-null float64\n",
      "Cabin          91 non-null object\n",
      "Embarked       418 non-null object\n",
      "dtypes: float64(2), int64(4), object(5)\n",
      "memory usage: 36.0+ KB\n"
     ]
    }
   ],
   "source": [
    "test.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Name</th>\n",
       "      <th>Sex</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>891</td>\n",
       "      <td>891</td>\n",
       "      <td>891</td>\n",
       "      <td>204</td>\n",
       "      <td>889</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unique</th>\n",
       "      <td>891</td>\n",
       "      <td>2</td>\n",
       "      <td>681</td>\n",
       "      <td>147</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>top</th>\n",
       "      <td>Reuchlin, Jonkheer. John George</td>\n",
       "      <td>male</td>\n",
       "      <td>347082</td>\n",
       "      <td>B96 B98</td>\n",
       "      <td>S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>freq</th>\n",
       "      <td>1</td>\n",
       "      <td>577</td>\n",
       "      <td>7</td>\n",
       "      <td>4</td>\n",
       "      <td>644</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                   Name   Sex  Ticket    Cabin Embarked\n",
       "count                               891   891     891      204      889\n",
       "unique                              891     2     681      147        3\n",
       "top     Reuchlin, Jonkheer. John George  male  347082  B96 B98        S\n",
       "freq                                  1   577       7        4      644"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.describe(include=['O']) #参数O代表只列出object类型的列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    549\n",
       "1    342\n",
       "Name: Survived, dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train['Survived'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x27202e5f470>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAFAZJREFUeJzt3X+QXWd93/H3xzKKB2OgoG3NSAKpICAKGFwvojQpMcUQOe1YaYBEsjvBUzcapsjuhBhXFKpSEcpUdEJDIxJE6kKZgHBMmy4ZtUoChknMj2odjI1klGxlg1ZCzRrzwySpxdrf/nGvTi5XV7tX1h5defV+zezoPuc899zvSlf72fOce54nVYUkSQAXjLoASdK5w1CQJDUMBUlSw1CQJDUMBUlSw1CQJDUMBUlSw1CQJDUMBUlS48JRF3C6li1bVqtWrRp1GZL0hHLXXXc9WFVj8/V7woXCqlWrmJycHHUZkvSEkuTrw/Rz+EiS1DAUJEmNVkMhyfokB5NMJdk6YP+zk9yR5MtJ7kny023WI0maW2uhkGQJsBO4GlgLbEqytq/bO4DbqupyYCPwgbbqkSTNr80zhXXAVFUdqqrjwG5gQ1+fAp7affw04GiL9UiS5tHmp4+WA4d72tPAy/v6vBP4/SQ3AhcDV7VYjyRpHm2eKWTAtv5l3jYBH66qFcBPAx9NclJNSTYnmUwyOTMz00KpkiRoNxSmgZU97RWcPDx0A3AbQFV9AbgIWNZ/oKraVVXjVTU+NjbvvReSpMepzeGjfcCaJKuBI3QuJF/b1+cbwKuBDyf5UTqh4KmAdJ675ZZbOHbsGJdeeik7duwYdTnnldZCoapmk2wB9gJLgFuran+S7cBkVU0Avw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HnkLn3qdGkqcAfw/4nZ75NH+kjW/kfGAoLE6P9Dx+rKf9GJ1/83fR+c/4j7trWHx2wDECvK6qnGdKZ2rgeynJy5n/vQrwYeBnquorSa4Hruw7/gXAd6rqpQtb9vnJ4aPz09OAI93H15+iz17gxhNTmSe5/CzUpcXpTN9LlwDfTPIk4Lr+nVX1PeD+JG/oHj9JXnKGNZ+3DIXz0w7gPUnupDMFySDvojOsdE+Sr3bb0uNxpu+lfw18CfgDOtfDBrkOuCHJV4D9nLx2i4bkHc2SpIZnCpKkhqEgSWoYCpKkhqEgSWoYCpKkhqEgnYbuPD77k9yT5O7uDVjSouEdzdKQkrwC+EfA36mqR5IsA5aOuCxpQXmmIA3vWcCDVfUIQFU9WFVHk1yR5HPdGTr3JnlWkgu7M3teCZDkPUnePcripWF485o0pO7Ea38MPBn4Q+ATwOeBzwEbqmomyc8DP1VV/zTJjwG3AzfRuYv85VV1fDTVS8Nx+EgaUlV9P8kVwN+nMwX0J4BfoTP98x90p/ZZAnyz239/ko/SmfnzFQaCnggMBek0VNWjdGaV/Wx3KvI3A/ur6hWneMqLge8Af+vsVCidGa8pSENK8oLuGhQnvJTO+hJj3YvQJHlSd9iIJD8LPBN4JfD+JE8/2zVLp8trCtKQukNH/4nOYi+zwBSwGVgBvJ/OlOQXAv8R+O90rje8uqoOJ7kJuKKq3jiK2qVhGQqSpIbDR5KkhqEgSWoYCpKkhqEgSWoYCpKkhqEgSWoYCpKkhqEgSWr8f83DZikTWHX2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Sex\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x27203105c18>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAEu1JREFUeJzt3X2QXXd93/H3R3JUgnGSgrcjjyVhBQSpIC6ebJTOeIYQYlI5mUqZ8hAZp4lnCBpmENAyoJg+qKCUaSsyMAlVMiiFhjABxbEzrcKoVVMwD3GxIxmEQRJKVPGgldggYQx26kZe+9s/9urXy3q190reo7trvV8zd3TPub977md1Z/az59z7OydVhSRJAEtGHUCStHBYCpKkxlKQJDWWgiSpsRQkSY2lIElqLAVJUmMpSJIaS0GS1Fwx6gAX6uqrr67rrrtu1DEkaVG5//77z1TV2KBxi64UrrvuOg4cODDqGJK0qCT5+jDjPHwkSWosBUlSYylIkppOSyHJ+iRHkxxLcvssj78vycHe7S+TPNRlHknS3Dr7oDnJUmAn8ApgAtifZE9VHT43pqr+ed/4NwE3dJVHkjRYl3sK64BjVXW8qs4Cu4GNc4y/BfhYh3kkSQN0WQrXAif6lid6654kyXOB1cAnO8wjSRqgy1LILOvOd+3PTcCdVfX4rBtKNic5kOTA6dOn5y2gJOn7dTl5bQJY2be8Ajh1nrGbgDeeb0NVtQvYBTA+Pv60vaj01q1bmZycZPny5ezYsWPUcSRdhroshf3AmiSrgZNM/+J/7cxBSV4I/F3gcx1mWRQmJyc5efLkqGNIuox1dvioqqaALcA+4AhwR1UdSrI9yYa+obcAu6vqabsHIEmLRafnPqqqvcDeGeu2zVh+Z5cZJEnDc0azJKmxFCRJjaUgSWosBUlSYylIkhpLQZLUWAqSpMZSkCQ1loIkqbEUJEmNpSBJaiwFSVJjKUiSGktBktRYCpKkxlKQJDWdXmRn1H7i7X8w6ggX5KozD7MU+MaZhx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a8DKCq3pDkp4BfAA4meUlVfTTJfb11+5L8WlV9cp5/DumCuacgDecTwGuSPAcgybNnGXMV8M3eabRvPbcyyfOq6r6q2gacAVYm+VHgeFX9NrAHuL7zn0AagnsK0hCq6lCSdwOfTvI48AXgthnD/jXTV1z7OvAlpksC4D29D5LDdLl8Ebgd+OUkjwGTwPbOfwhpCH7QLElqPHwkSWosBUlSYylIkhpLQZLUWAqSpMZSkCQ1loIkqbEUJEnN/wP/ZDFkBnuKwgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Pclass\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272031c7da0>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAE69JREFUeJzt3X+wX3V95/Hni9AsBdltK7eLJaEw25QtdanWW6RLR/yBNq4tzGzRAurqjDbbGaPu+oOBaYe1OJ2dxVbbralrbNm1toosttvYZoutgq3sFhMQwZCmRkByEzMkIhQtBQLv/eN78tkvt9/kfm9yz/3mJs/HzHfu+Zzv55zv+2Zy7+uezznnc1JVSJIEcNykC5AkHTkMBUlSYyhIkhpDQZLUGAqSpMZQkCQ1hoIkqTEUJEmNoSBJao6fdAHzdcopp9QZZ5wx6TIkaUm5/fbb91bV1Fz9llwonHHGGWzevHnSZUjSk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C\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"SibSp\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272031bd320>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAErZJREFUeJzt3X+QXWd93/H3RxKuY8fgEqkVtSTsFIXEpRRTYWCcAScYamjGbidusAnNjzLRMIMhHQIa0jCGOMO0FR1SQgyNAoQfoXYdu8moqYrTgjGuW4MkMMY/U9U2aGXv+Bc2NhiM5G//uEdP1+vV7l3pnj1a+/2a2dl77n3u2Y80kj46zznnuakqJEkCWDF0AEnS0cNSkCQ1loIkqbEUJEmNpSBJaiwFSVJjKUiSGktBktRYCpKkZtXQARZr9erVdfLJJw8dQ5KWld27d99fVWsWGrfsSuHkk09m165dQ8eQpGUlybfGGef0kSSpsRQkSY2lIElqLAVJUmMpSJKa3kohySeT3JvkpkO8niR/kGRPkhuTvLSvLJKk8fR5pPAp4Ox5Xn89sLH72gx8rMcskqQx9FYKVfVl4MF5hpwLfKZGrgdOTPK8vvJIkhY25M1rJwF7Z2xPdc/dM0wc6fBt2bKF6elp1q5dy9atW4eOIx22IUshczxXcw5MNjOaYmLDhg19ZpIOy/T0NPv27Rs6hnTEhrz6aApYP2N7HXD3XAOraltVbaqqTWvWLLh0hyTpMA1ZCtuBX+muQn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SLrt08c+G1JI8muTjJV4BXJnlZkv/VfcbCVw/ecQv8nSSfT/J/kmwd4Ncizcs7mqV5JFnFaJG1g3fI/ouqerBbzmJnkiur6gHgeOCmqrqouyv1NuCNVbWzWxr5se79L2G0CuwPgduTfKSq9iIdJSwFaW4/NmPJjWvp1roH3pHkn3aP1wMbgQeAA4wW9AN4IXBPVe0EOLjia7cMwxeq6uFu+xbg+Tx52XZpUJaCNLfHuqWwmyRnMlrs7pVV9f0kXwKO7V7+QVUdODiUQy+9/sMZjw/g30EdZTynII3vOcB3ukL4aeAVhxh3G6NzBy8DSHJCNw0lHfX8gyqN7/PAW5PcCNwOzPkZzFX1eJI3Ah/pzj08xugIQzrquUqqJKlx+kiS1FgKkqTGUpAkNZaCJKmxFCRJjaUgSWosBUlSYylIkpr/B63JEUdiRJgBAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(x=\"Parch\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(12.359751157407416, 0.5, 'density')"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeoAAADQCAYAAADI+yJFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3Xd8VFX6+PHPM+m9h5KQhBIIvUUEEawIuiq2tXdcdUW3uK6r67rrul/b7lpX158Fdd21riuKFQUbIgJBeg8QIL33OjPn98cdNMSUETOZSfK8X695Zebec888FyZ55p57ihhjUEoppZRvs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v+9a9dmBJ4Cvyu/pa8CyFtb6fNzcQq9c7ZwAAAGJSURBVNTMzKxig7z1bWZm1jwXajMzs4q5UJuZmVXMhdrMzKxiLtRmZmYVc6E2a4ykuyWFpCu6zmJmC8+F2qw9Y8DHZJMTMxtwLtRmDSn91EfIhjhby7WzJD1fZvWOS3pb0mh5baOkj8rgi3d6bSLNrB0u1GZtuYucg3wA+FXSBuAeckTq1cCD5Li/Xv/154DRiNgIvAw81UVoMztzS2Z+i5lVZIwcvAE5iGMMWArsiIiTwBFJu8vr64D1wHvZHpmzyTa1ZtYQF2qzRkhaSU7IWi8pyMIb5OSpab8E2BcRNy5SRDNbAN76NmvHKPBqRFwWEWsi4lLgIPAzcG85q76IHNAB8DWwStKprXBJV3UR3MzOnAu1WTvG+P+n553AJeTEtUngRWAPcDwi/iKL+9OS9pJTzTYtXlwzmw+enmU2ACStiIg/yvb4J8BI5NxkM2ucz6jNBsO4pGHgHOBJF2mzweFP1GZmZhXzGbWZmVnFXKjNzMwq5kJtZmZWMRdqMzOzirlQm5mZVewfetZTFfJkGtQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 483.875x216 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "facet = sns.FacetGrid(train, hue=\"Survived\",aspect=2)\n",
    "facet.map(sns.kdeplot,'Age',shade= True)\n",
    "facet.set(xlim=(0, train['Age'].max()))\n",
    "facet.add_legend()\n",
    "plt.xlabel('Age') \n",
    "plt.ylabel('density') "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272032b06a0>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEKCAYAAAAIO8L1AAAABHNCSVQICAgIfAhkiAAAAA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5FNdKez6uZHCMYhfAvdFxAeSfk3huQIvAY+2tZCI+Lakw4EfAn8OXAoslNQ76/L1iPhNttvq/0jaQiGMPtGOWs32iW/WZ2ZmSd7FZGZmSQ4IMzNLckCYmVmSA8LMzJIcEGZmluSAMDOzJAeEmZklOSDMzCzp/wNBUwXY96B1egAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot('Embarked',hue='Survived',data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 891 entries, 0 to 890\n",
      "Data columns (total 12 columns):\n",
      "PassengerId    891 non-null int64\n",
      "Survived       891 non-null int64\n",
      "Pclass         891 non-null int64\n",
      "Name           891 non-null object\n",
      "Sex            891 non-null object\n",
      "Age            891 non-null float64\n",
      "SibSp          891 non-null int64\n",
      "Parch          891 non-null int64\n",
      "Ticket         891 non-null object\n",
      "Fare           891 non-null float64\n",
      "Cabin          204 non-null object\n",
      "Embarked       889 non-null object\n",
      "dtypes: float64(2), int64(5), object(5)\n",
      "memory usage: 83.6+ KB\n"
     ]
    }
   ],
   "source": [
    "age_median = train['Age'].median() # 中位数\n",
    "train.loc[train['Age'].isnull(),'Age'] = age_median #把所有的空值换成中位数\n",
    "train.info()#看看情况怎么样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 把机器学习不能处理的字符值转换成机器学习可以处理的数值\n",
    "# .loc 通过自定义索引获取数据 , 其中 .loc[:,:]中括号里面逗号前面的表示行，逗号后面的表示列\n",
    "train.loc[train[\"Sex\"] == \"male\", \"Sex\"] = 0\n",
    "train.loc[train[\"Sex\"] == \"female\", \"Sex\"] = 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 891 entries, 0 to 890\n",
      "Data columns (total 12 columns):\n",
      "PassengerId    891 non-null int64\n",
      "Survived       891 non-null int64\n",
      "Pclass         891 non-null int64\n",
      "Name           891 non-null object\n",
      "Sex            891 non-null int64\n",
      "Age            891 non-null float64\n",
      "SibSp          891 non-null int64\n",
      "Parch          891 non-null int64\n",
      "Ticket         891 non-null object\n",
      "Fare           891 non-null float64\n",
      "Cabin          204 non-null object\n",
      "Embarked       891 non-null int64\n",
      "dtypes: float64(2), int64(7), object(3)\n",
      "memory usage: 83.6+ KB\n"
     ]
    }
   ],
   "source": [
    "# 通过统计三个登船地点人数最多的填充缺失值\n",
    "train[\"Embarked\"] = train[\"Embarked\"].fillna(\"S\")\n",
    "# 字符处理\n",
    "train.loc[train[\"Embarked\"] == \"S\", \"Embarked\"] = 0\n",
    "train.loc[train[\"Embarked\"] == \"C\", \"Embarked\"] = 1\n",
    "train.loc[train[\"Embarked\"] == \"Q\", \"Embarked\"] = 2\n",
    "train.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7934904601571269\n"
     ]
    }
   ],
   "source": [
    "# 选择清洗过的特征\n",
    "predictors = [\"Pclass\", \"Sex\", \"Age\", \"SibSp\", \"Parch\", \"Fare\", \"Embarked\"]\n",
    "# 将m个样本平均分成11份进行交叉验证\n",
    "kf = KFold(n_splits=11,random_state=1)\n",
    "\n",
    "#导入线性回归\n",
    "alg = LinearRegression()\n",
    "predictions = []\n",
    "for train_L, test_L in kf.split(train):\n",
    "    #train_predictors选取训练用的特征\n",
    "    train_predictors = (train[predictors].iloc[train_L, :])\n",
    "    # train_target选取了目标特征，这里是Survived\n",
    "    train_target = train[\"Survived\"].iloc[train_L]\n",
    "    # 丢进线性回归模型进行训练\n",
    "    alg.fit(train_predictors, train_target)\n",
    "    # 用剩下的一份数据作为测试集进行预测\n",
    "    test_predictions = alg.predict(train[predictors].iloc[test_L, :])\n",
    "    predictions.append(test_predictions)\n",
    "\n",
    "# 使用线性回归得到的结果是在区间[0,1]上的某个值，需要将该值转换成0或1\n",
    "predictions = np.concatenate(predictions, axis=0)\n",
    "predictions[predictions > .5] = 1\n",
    "predictions[predictions <= .5] = 0\n",
    "\n",
    "# 查看模型准确率\n",
    "accuracy = sum(predictions == train[\"Survived\"]) / len(predictions)\n",
    "print(accuracy)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8002744244614163\n"
     ]
    }
   ],
   "source": [
    "from sklearn.model_selection import cross_val_score\n",
    "#导入逻辑回归模型\n",
    "alg = LogisticRegression(random_state=1)\n",
    "# 交叉验证\n",
    "scores = cross_val_score(alg, train[predictors], train[\"Survived\"], cv=11)\n",
    "# 取scores的平均值\n",
    "print(scores.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8170594837261503\n"
     ]
    }
   ],
   "source": [
    "#导入随机森林模型\n",
    "alg = RandomForestClassifier(random_state = 10, warm_start = True, \n",
    "                                  n_estimators = 26,\n",
    "                                  max_depth = 6, \n",
    "                                  max_features = 'sqrt')\n",
    "kf = KFold(n_splits=11,random_state=1)\n",
    "# 交叉验证\n",
    "scores = cross_val_score(alg, train[predictors], train[\"Survived\"], cv=kf)\n",
    "print(scores.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272032b0320>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     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9mcTPeQ9oB7DOS68+wPyvJiVV1URY3eV17pcqh4pZVdcWqr6dl0bbXV9VfZ3GCacVvJHlAVX0oi6HA1w3znf4uzknyusPoCp1bZzHE8dLp93xCbnh11mHtALaTj0vypGkbcUmSU+apbHNNJ1UenuRHq+oT077yWVkcM1yUxXHEu5Kc1t27l1boBttLu8/KYtt3Xha/89VXpn40yROmv5c7JPm9afkZSd5WM95se+3x+17WG9qHd/dZSV6U5C+ntp+f66/GeUIW/z9dlEXAfPq0/LeS/Oeqel8W90gacUaSi6rqlb34NMhfS/L26bnfkcW9io7O4qrIC5O8PIsbgR+Z5E+mY9YLsrif1T8NvmaS6z4N7WtZnAg40PfyLyS5ee37Q3n2tH14aqZ9aS2G/D15f9pwMFZuBAgAALOpqkckeVh3H6qh0Wyms+MfSvJTfQjcVxHYWNMw4Ld2972WXAqDpquCXtrd91t2LcvgiiQAAGZVVQ9L8pwk691H7Uatqk7I4pOb3ilEAtj6qurJSV6dxRVQN0quSAIAAABgiCuSAAAAABgiSAIAAABgiCAJAAAAgCGCJACA/VBVd6yqC6ev3VW1a9X8+6Z1jquqn171MydV1VuXVzUAwMbYtuwCAAAOJd39+ST3SZKqelaSq7v7t9asdlySn07yqk0tDgBgZq5IAgDYIFV19TT53CQ/OF2l9Itr1rlVVb2sqs6tqguq6pTNrxQA4MAIkgAANt7Tk/x1d9+nu397zWPPSPKu7v6eJA9M8vyqutWmVwgAcAAESQAAm+vBSZ5eVRcmeXeSmye581IrAgAY5B5JAACbq5I8ors/vuxCAAD2lyuSAAA23peT3GYPj52d5OerqpKkqu67aVUBABwkQRIAwMa7KMk1VfXhtTfbTvLsJDdJclFVXTzNAwAcEqq7l10DAAAAAIcAVyQBAAAAMESQBAAAAMAQQRIAAAAAQwRJAAAAAAwRJAEAAAAwRJAEAAAAwBBBEgAAAABD/n83ktd24L7h3gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 1440x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 查看不同Name的称呼的获救情况\n",
    "train['Title'] = train['Name'].apply(lambda x:x.split(',')[1].split('.')[0].strip())\n",
    "plt.figure(figsize=(20, 8))#调整图的大小（长，宽）\n",
    "sns.barplot(x=\"Title\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272033aa048>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAEiJJREFUeJzt3X+w3Xdd5/HnKym1UoMdSNwwTWs6GtCuInWv1Zm6/JCCAbV1pGgLWN3p2tkZWt0FvVMHp6tlmN0Nu7CrFjUqIqitFdSJbrT+oIBWC0mgFNJYJ7aF3JS7SVtaCuKWtO/945x+9nB7c89Je773e+/N8zFz5pzv9/s53/P+Tqd53c/n+/1+vqkqJEkCWNd3AZKklcNQkCQ1hoIkqTEUJEmNoSBJagwFSVJjKEiSGkNBktQYCpKk5pS+CzhRGzdurK1bt/ZdhiStKvv27bu/qjaNa7fqQmHr1q3s3bu37zIkaVVJ8ulJ2jl8JElqDAVJUmMoSJIaQ0GS1BgKkqSms1BI8q4kR5J86jjbk+QXkxxMckeSb++qFknSZLrsKbwb2L7E9lcC24avK4Ff6bAWSdIEOguFqvow8OASTS4G3lMDtwFnJHluV/VIksbr8+a1M4FDI8tzw3Wf7aeck8/s7Czz8/Ns3ryZHTt29F2OpBWgz1DIIutq0YbJlQyGmDj77LO7rOmkMj8/z+H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tnX65DVpLaiqB4AXAiT5eeALVfXfFzTbCrwW+L1lLU6aMnsK0tOQ5InZSv8r8G+HvYf/tKDN6cPnV+wZPiNgTc24q7XFUJCm4xrgb6rqhVX1jgXb3sxguobvAF4KvG04vYG04hgKUvdeAVwznOr6g8BpwNm9ViQdh+cUpO4FeHVV3dV3IdI49hSk6XgE2HCcbTcDVw9nbyXJectWlXSCDAVpOu4AjiX5xMITzcBbGDwy844knxouSyuSs6RKkhp7CpKkxlCQJDWGgiSpMRQkSY2hIElqDAVJUmMoSJIaQ0GS1Pw/Y/fPLJIr4A8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "Title_Dict = {}\n",
    "Title_Dict.update(dict.fromkeys(['Capt', 'Col', 'Major', 'Dr', 'Rev'], '4'))\n",
    "Title_Dict.update(dict.fromkeys(['Don', 'Sir', 'the Countess', 'Dona', 'Lady'], '1'))\n",
    "Title_Dict.update(dict.fromkeys(['Mme', 'Ms', 'Mrs'], '0'))\n",
    "Title_Dict.update(dict.fromkeys(['Mlle', 'Miss'], '2'))\n",
    "Title_Dict.update(dict.fromkeys(['Mr'], '5'))\n",
    "Title_Dict.update(dict.fromkeys(['Master','Jonkheer'], '3'))\n",
    " \n",
    "train['Title'] = train['Title'].map(Title_Dict)\n",
    "sns.barplot(x=\"Title\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272033c83c8>"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29md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11XVfcDJPk+sG0q5VuANz/Xm1RVJfkMcFqSixhMT/DOqnomyXHA6xjMrfOxJK+tqnMn7iPJ2xlMXndsM8z0BuDywbQ8APzUDvzvlnaIpaCF7A8Y/Ov9UAZHzf889NxPhh5vHVreyvR/by4CvtDs7/Kq2gKDwmAwN9K3k3yl2e7c4Rcm+UXgw8CRTZEsAh6ZpNCkTjh8pIVsH+D+qtrKYIho8WzstJlG+z7gQwxusUiSlyUZnrr6MOBZdxxLsg+D6cDfWVUPNvt6jMGQ00nNNkly6GzklCbjkYIWsguBzzUfuFczuBHNbPksg7OLtk1X/QLgz5K8jMERxIPAuya85l8DLwf+cttQUXOEcCrwiSQfavZzKYPvKKRZ5ympUgeSnA/cWFWf6juLtCMsBWmWJbmewVHHMVX1k+m2l+YTS0GS1PKLZklSy1KQJLUsBUlSy1KQJLUsBUlSy1KQJLX+H/lopcy8y615AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "train['FamilySize']=train['SibSp']+train['Parch']+1\n",
    "sns.barplot(x=\"FamilySize\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAEgFJREFUeJzt3XuMnFd9xvHvYweXW0CCLEoUOzgCh+JyS1ncSxD3tEkrJbQESAiFVLQWEgZaClGiIkOD6MVIoFIMxZRAioAQLm1N5TYUCBRCAW8uCjjGYJKA18ZgCPcCySa//rHj02Ez3hkn+3rW9vcjrfxezp75S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n0JP/St396kgMuk5BkTZLPJbmu9+8j+k6vSPKfvedqvKbvd57fq+X6JG/vLbUudcJQ0JHqPn1TR/s/tL8DnF5Vvw48F3hzX/vHAi8HHs3s3a2nVNUa4J+Al87zOp8EHplkorf/x8C75mn/FeBJVXUqsB74675za4DzgccBz04ymeSRvVpP64187ui1kTrh9JGOVIOmj+4FvCXJ/g/XU/rOba2qbwEk+Trwsd7xLwFPPdCLVFUleQ/w/CTvAn4LeME8dT0QuCzJKmZXwr1X37n/qqrv9Wr4CPBEYAZ4PLB1doke7sNsuEmdMBR0NPlz4NvMjgqWAD/vO/eLvu07+/bvZPj/k3cBH+3198HeWlYH8jrgqqr6g97F70/1nZu75kwxu6z6ZVV18ZAapAXh9JGOJg8EvlVVdzI7RbQgc/NVtYfZpc5fDbx7hBp297YvmHPu9CQPSnIf4JnA1cAngHOSPASgd/6hC1G3NIgjBR1N3gp8OMmzgauAny5g3+8FJgY81/eGJHf2tq8ANjA7ffQKZq9H9Pss8B7g4cD7qmoKIMmrgY8lWQLcDrwE+MYC1i41rpIqLYDePQbXVdU7x12LdE8YCtI9lOQaZkcdp1fVL4a1lxYzQ0GS1HihWZLUGAqSpMZQkCQ1hoIkqTEUJEmNoSBJav4PjjW95umqRQUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "def Fam_label(s):\n",
    "    if (s >= 2) & (s <= 4):\n",
    "        return 2\n",
    "    elif ((s > 4) & (s <= 7)) | (s == 1):\n",
    "        return 1\n",
    "    elif (s > 7):\n",
    "        return 0\n",
    "train['FamilyLabel']=train['FamilySize'].apply(Fam_label)\n",
    "sns.barplot(x=\"FamilyLabel\", y=\"Survived\", data=train)\n",
    "\n",
    "train.drop(['FamilySize'],axis=1, inplace=True)#删除FamilySize这一列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272033bb860>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAE1JJREFUeJzt3X+w3XV95/HnK8GQQoGuJDYdAoZtQ5WilW5EtzjFH6jozIJtaQva1d1a0+0InR21WXftUErL2I1bra20mu0Pld1Kqc520p2sOFusdVlxExTRwOJEQHODdwlEWH9gQ+DdP865356c3Nxzcnu/93tu7vMxc+ee7/d8z/e87uGS1/1+vr9SVUiSBLCi6wCSpMlhKUiSGpaCJKlhKUiSGpaCJKlhKUiSGpaCJKlhKUiSGpaCJKlxQtcBjtWaNWtqw4YNXceQpCXljjvueLiq1o5absmVwoYNG9i1a1fXMSRpSUny1XGWc/hIktSwFCRJDUtBktSwFCRJDUtBktRorRSS/EmSh5J86SjPJ8nvJdmT5K4kP9ZWFknSeNrcUvggcMkcz78K2Nj/2gz8YYtZJEljaK0UqupvgQNzLHIZ8OHquR34viQ/0FYeSdJoXZ68dgawd2B6qj/v693E0VKxZcsWpqenWbduHVu3bu06jnRc6bIUMsu8mnXBZDO9ISbOOuusNjNpCZienmbfvn1dx5COS10efTQFnDkwvR54cLYFq2pbVW2qqk1r1468dIckaZ66LIXtwOv7RyG9EHisqhw6kqQOtTZ8lOQjwIuBNUmmgF8HngZQVe8HdgCvBvYA3wH+dVtZJEnjaa0UqurKEc8X8Oa23l+SdOw8o1mS1LAUJEkNS0GS1LAUJEkNS0GS1LAUJEkNS0GS1LAUJEkNS0GS1LAUJEkNS0GS1LAUJEkNS0GS1OjyzmvSccNbhOp4YS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3pVkZ5K7kvzSzLJJtiT5Yn/r4rATyZKsSPKhJL+12D+DNIpbCtIxGLoC6mXAY1X1/CQnArcl+QTwLHpXKX1BVX2nfymVGScA/xX4UlVdv9j5pVEsBenYzVwB9RXAc5PMXMzwNGAjcDHwp1X1HYCqOjDw2g8AN1sImlQOH0nHYOgKqAGurqrn9b/OrqpP9Ocf7fox/xt4SZLVi5NYOjaWgjSmWa6Aegvwy0me1n/+nCQnA58AfiHJSf35g8NHfwzsAP4iiVvqmjj+Ukpzm+sKqH8EbAA+17/15n7gNVX18f49tnclOUivBP7DzAqr6t1JTgNuTPK6qnpq8X4caW5eJVWS1HD4SJLUsBQkSQ1LQZLUsBQkSQ1LQZLUsBQkSQ1LQZLUsBQkSY2/B5L4XVjDVNqOAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "train['Cabin'] = train['Cabin'].fillna('Unknown')\n",
    "train['Deck']=train['Cabin'].str.get(0)\n",
    "sns.barplot(x=\"Deck\", y=\"Survived\", data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272035798d0>"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAELCAYAAAA2mZrgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAFWxJREFUeJzt3X2QXXd93/H3RzLCsTEQ8FJ5LBmpRJAoDsGTRXRqavNgUpl2ZDpAIgVSaBzUdJAhcRzFNIxCFJg2YsY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VdUDwFpgXTrmJ/lgkp1J7knybw+3TbI+yb3dq4v/2HucJPOSfCLJ+/udJ8mL6Ayf/t6qerJ77smq+p3u/ld1J7m5Ebi3u+3qJF/tvn65u21J76RCSa5J8r7u8i1J/lOSL3Tfs2L2PinJKwWdJqpqb7f76AV05rh4pKpenuSZwG1JPgP8KPAG4BVV9YMkz+s5xBnAHwFfraoPHOU0Pw585XAgHMUK4MKquj/JTwH/BngFnRF2b09yK/DQDP86Z1fVP+1OQHQ9MOdH5tTJwysFnU4OD23+08C/7o6DfzvwfGAZnQHN/qCqfgBQVb2T+3yM6QPhyJMlv9G9r9E7Uu6Xq+r+7vIrgf9eVd/vTtbyp8A/G+DQn+zW9zng2YcHZZNmg6Gg00KSfww8QWcylABXVdXLuq+lVfWZ7vajDQb2BeDVSc6c5jS7gZ88fEO7qj7Qva/x7J423+8t6yjHOcRT/9+ces6pNTqAmWaNoaBTXvdm738FPlydESB3AP+uO7cASV6c5GzgM8AvJDmru723++jjwHbgT5L07XatqnFgDHh/d75uuiFytC//zwFvSHJW9/z/Cvg88HfAC5I8v9u99S+nvO9nu8d+JZ1usEeO4eOQpuU9BZ2qfqjbPfQMOn953wAcnkPg94ElwJ3dOQYm6Uxg/7+TvAwYS/IYnRD494cPWFXXJXkOcEOStxzl3sEvAh8ExpM8CDwK/Hq/AqvqziR/CHz5cF1VdRdAko10urbu58gx+h9K8gU6VyBH/LJJejocOluaQ5LcAlxTVWPDrkWnJruPJEkNrxSk45DkduCZUzb/fFXdO4x6pNliKEiSGnYfSZIahoIkqWEoSJIahoIkqWEoSJIa/w8hRQfVcWEUHAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "def Deck_Group(s):\n",
    "    if (s == 'E') | (s == 'D') | (s == 'B'):\n",
    "        return 3\n",
    "    elif ((s == 'C') | (s == 'F')) | (s == 'G') | (s == 'A'):\n",
    "        return 2\n",
    "    elif (s == 'U'):\n",
    "        return 1\n",
    "    else:\n",
    "        return 0\n",
    "\n",
    "train['Deck_Group'] = train['Deck'].apply(Deck_Group)\n",
    "sns.barplot(x='Deck_Group', y='Survived', data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x272035828d0>"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAFuxJREFUeJzt3X2QXXd93/H3R3IU18aGgpWKWhJWQVBUQuxkI9Ka8mionGRk2pBEAlpoCCoziIc6IEzwOEQJkyIykLRRPSjGhBCwYkxolYwSk4J5iHnS2hiMZESFbNBKbCxjA7ZxYmR/+8cenV6uVrt35T26Wun9mrmz95z7u2c/2hntZ8/vnodUFZIkAcwbdgBJ0onDUpAktSwFSVLLUpAktSwFSVLLUpAktSwFSVLLUpAktSwFSVLrtGEHmKlzzjmnzjvvvGHHkKQ55aabbrqrqhZON27OlcJ5553H6OjosGNI0pyS5JuDjHP6SJLUshQkSS1LQZLUshQkSS1LQZLUshQkSS1LQZLU6rQUkqxKsjvJniSXTfL60iQ3JPlSkq8k+fku80iSptbZyWtJ5gObgRcAY8COJNuqalfPsMuBa6vqyiQrgO3AeV1l0oltw4YNjI+Ps2jRIjZt2jTsONIpqcszmlcCe6pqL0CSrcAlQG8pFHB28/zRwIEO8+gENz4+zv79+4cdQzqldVkK5wL7epbHgGf0jXkb8LEkrwXOBC7qMI8kaRpdfqaQSdZV3/Ja4E+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c09Bp5Qk9/U839DcQ+DLSf5b37h5Sd6f5Heb5Rcm+VySm5N8uNkjeB3wz4EbmvtZPJGJy0NcXlUPA1TVwap6R7ON5zTjPgTc2qy7NMlXm8cbmnXn9d7XI8kbm3I7vCfzB0k+27xnLl2OQnOAewo6JSW5GHgRE9et/0GSx/a8fBrwQeCrVfX2JOcAlwMXVdX9Sd4MXFpVG5t7KDy3qu5Kshr48uFCOIqVwNOq6vYkP8PEmbfPAAJ8IcmngHumiX9mVf2b5qJ1VwNz5uKBOvG5p6BT1UXA+6rqBwBV1XsvjffQFEKz/HPACuDG5jIiLweeMN03SPLW5nOMAz2rv1hVtzfPnwl8tKrub+4n8RfAvx0g+zVN5k8DZx++bpQ0GywFnarC0W/k81nguUlO7xn7t1V1fvNYUVWvnOR9u4CfSjIPoKre3lwO/OyeMff3ZZjMIX70/+bpfa/35/ZaNZo1loJOVR8Dfu3wkUN900fvBbYDH05yGvB54MIkT2rGnpHkyc3Ye4GzAKpqDzAK/G5zcT+aYjnaL/9PAy9qtncm8O+BzwB/D/xEcxTVjwP9t/b81WbbzwS+V1XfO9YfgtTPzxR0Sqqqv0lyPjCa5EEmSuA3e15/V5JHAx8AXgq8Arim+SUNE58xfB3YAvx1km9X1XOBXwfeCexJcjfwAPDmo2S4OcmfAF9sVl1VVV8CSLKRibvn3c6RlxG/pzm09mwmObJJeiS8Sqo0hyT5JPDGqhoddhadnJw+kiS13FOQJLXcU5AktSwFSVLLUpAktSwFSVLLUpAktSwFSVLr/wEPUo6SSJU4fwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "Ticket_Count = dict(train['Ticket'].value_counts())\n",
    "train['TicketGroup'] = train['Ticket'].apply(lambda x:Ticket_Count[x])\n",
    "sns.barplot(x='TicketGroup', y='Survived', data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x27203726d30>"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEKCAYAAAD9xUlFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAEhZJREFUeJzt3X+QXWddx/H3J1tjh9LqQOMUm5R0JKgRsQxrcASRasFUnRSlYgGVKppxxohMB2pRpmqUUYNTxDEiEaqI0FJ+qKsTrYr8mmIh21KBpFZjCnQTIimtpS1o2fbrH3vzeHt7s/fS5uzdZt+vmTt7nuc859xvdjb72fPc8yNVhSRJAKsmXYAkafkwFCRJjaEgSWoMBUlSYyhIkhpDQZLUGAqSpMZQkCQ1hoIkqTlp0gV8tU4//fRav379pMuQpEeVG2644faqWjNq3KMuFNavX8/s7Oyky5CkR5UknxlnnNNHkqTGUJAkNYaCJKkxFCRJjaEgSWoMBUlSYyhIkhpDQZLUPOouXpN04rv00ks5fPgwZ5xxBjt27Jh0OSuKoSBp2Tl8+DAHDx6cdBkrktNHkqTGUJAkNYaCJKkxFCRJjaEgSWoMBUlSYyhIkhpDQZLUGAqSpKbTUEiyOcktSfYnuewYY16YZF+SvUne0WU9kqTFdXabiyRTwE7gucAcsCfJTFXt6xuzAXg18MyqujPJN3RVjyRptC6PFDYB+6vqQFXdB1wNXDAw5ueAnVV1J0BVfb7DeiRJI3QZCmcCt/W153p9/Z4MPDnJdUmuT7K5w3okSSN0eZfUDOmrIe+/AXgOsBb4cJKnVNV/P2hHyVZgK8BZZ511/CuVJAHdHinMAev62muBQ0PG/HVVfaWqbgVuYSEkHqSqdlXVdFVNr1mzprOCJWml6zIU9gAbkpydZ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njd0K/NvApnf2Tq09jSFnNkmPhHdJlR5FknwAeGVVzU66Fp2YnD6SJDUeKUiSGo8UJEmNoSBJagwFSVJjKEiSGkNBktQYCpKk5v8A36nQGltNX44AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "def Ticket_Label(s):\n",
    "    if (s >= 2) & (s <= 4):\n",
    "        return 2\n",
    "    elif ((s > 4) & (s <= 8)) | (s == 1):\n",
    "        return 1\n",
    "    elif (s > 8):\n",
    "        return 0\n",
    "\n",
    "train['TicketGroup'] = train['TicketGroup'].apply(Ticket_Label)\n",
    "sns.barplot(x='TicketGroup', y='Survived', data=train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>PassengerId</th>\n",
       "      <th>Survived</th>\n",
       "      <th>Pclass</th>\n",
       "      <th>Name</th>\n",
       "      <th>Sex</th>\n",
       "      <th>Age</th>\n",
       "      <th>SibSp</th>\n",
       "      <th>Parch</th>\n",
       "      <th>Ticket</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Cabin</th>\n",
       "      <th>Embarked</th>\n",
       "      <th>Title</th>\n",
       "      <th>FamilyLabel</th>\n",
       "      <th>Deck</th>\n",
       "      <th>Deck_Group</th>\n",
       "      <th>TicketGroup</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Braund, Mr. Owen Harris</td>\n",
       "      <td>0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>A/5 21171</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>U</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n",
       "      <td>1</td>\n",
       "      <td>38.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>PC 17599</td>\n",
       "      <td>71.2833</td>\n",
       "      <td>C85</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>C</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>Heikkinen, Miss. Laina</td>\n",
       "      <td>1</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>STON/O2. 3101282</td>\n",
       "      <td>7.9250</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>U</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n",
       "      <td>1</td>\n",
       "      <td>35.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>113803</td>\n",
       "      <td>53.1000</td>\n",
       "      <td>C123</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>C</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>Allen, Mr. William Henry</td>\n",
       "      <td>0</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>373450</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>Unknown</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>U</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   PassengerId  Survived  Pclass  \\\n",
       "0            1         0       3   \n",
       "1            2         1       1   \n",
       "2            3         1       3   \n",
       "3            4         1       1   \n",
       "4            5         0       3   \n",
       "\n",
       "                                                Name  Sex   Age  SibSp  Parch  \\\n",
       "0                            Braund, Mr. Owen Harris    0  22.0      1      0   \n",
       "1  Cumings, Mrs. John Bradley (Florence Briggs Th...    1  38.0      1      0   \n",
       "2                             Heikkinen, Miss. Laina    1  26.0      0      0   \n",
       "3       Futrelle, Mrs. Jacques Heath (Lily May Peel)    1  35.0      1      0   \n",
       "4                           Allen, Mr. William Henry    0  35.0      0      0   \n",
       "\n",
       "             Ticket     Fare    Cabin  Embarked Title  FamilyLabel Deck  \\\n",
       "0         A/5 21171   7.2500  Unknown         0     5            2    U   \n",
       "1          PC 17599  71.2833      C85         1     0            2    C   \n",
       "2  STON/O2. 3101282   7.9250  Unknown         0     2            1    U   \n",
       "3            113803  53.1000     C123         0     0            2    C   \n",
       "4            373450   8.0500  Unknown         0     5            1    U   \n",
       "\n",
       "   Deck_Group  TicketGroup  \n",
       "0           1            1  \n",
       "1           2            1  \n",
       "2           1            1  \n",
       "3           2            2  \n",
       "4           1            1  "
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEuCAYAAACedunCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAH61JREFUeJzt3XmYZVV97vHvSyOgRAS0IUTERmwRNTLYKsbEASQXNQpRCKLGjkFbnzigZLhoEr3ihF4ToxiNXBE7kauAQ0CNBtICSlS0GxlEMCgiciVQKgQEwQDv/WPtok+X1X1OVe91TtXy/TxPPefsfYbf6qF+e+3fXmtt2SYiIha/LSbdgIiI6EcSekREI5LQIyIakYQeEdGIJPSIiEYkoUdENCIJPSKiEUnoERGNSEKPiGjEluMM9oAHPMDLli0bZ8iIiEVv3bp1P7a9dNj7xprQly1bxtq1a8cZMiJi0ZP0g1Hel5JLREQjktAjIhqRhB4R0Ygk9IiIRiShR0Q0Igk9IqIRSegREY1IQo+IaMRYJxZFRMzFsmM/V+V7rz7+mVW+d9LSQ4+IaEQSekREI5LQIyIakYQeEdGIoQld0p6SLhr4uVnSayTtKOlsSVd2jzuMo8ERETG7oQnd9nds72N7H+AxwG3Ap4FjgTW2lwNruu2IiJiQuZZcDgS+Z/sHwCHA6m7/auDQPhsWERFzM9eE/jzgY93znW1fB9A97jTbByStkrRW0tqpqan5tzQiIjZp5IQuaSvg2cDpcwlg+0TbK2yvWLp06B2UIiJinubSQ386cKHt67vt6yXtAtA93t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fR74fK3vXyDOk/R6ytnWQcCfUCaLTVwSekTbbpO0FXCRpHcC17F+ad1eSDrf9m9LuoUNe6qijEOvUd6ZpGOBoygzYl8G/AvwoYm2qJNhixENk/Rg4HpK/fy1lPuavt/2d3uM8UszJ1snaSmA7alJt2VQEnpEgyTtZvuaMcVaENPea+vWqnkj8ErK2YeAu4ATbB83ybZNS8klok3/DExPZvqk7edWjLXTxm51B9VudzcJr6HctOOxtr8PIOkhwAckvXYhLESWhB7RpsEJS9UW/+osAX6N+pOkJu1FwEGDN+2wfZWkF1JWs0xCj4gqNjWZqW/XLZSSQ2X3mu0OTLanJN1rEg2aKQk9ok2bmszU98iT1nvm0za1YmW11SznIhdFI2KzSNqx5k06FgpJdwG3zvYSsI3tiffSk9AjIhqxxaQbEBER/UhCj4hoRBJ6REQjktAjIhrx/wHF7idnYAHKNwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "predictors = [\"Pclass\", \"Sex\", \"Age\", \"SibSp\", \"Fare\",\"Parch\", \"Embarked\", \n",
    "\"FamilyLabel\", \"TicketGroup\", \"Title\",\"Deck_Group\"]\n",
    "selector = SelectKBest(f_classif, k=5)\n",
    "selector.fit(train[predictors], train[\"Survived\"])\n",
    "\n",
    "scores = -np.log10(selector.pvalues_)\n",
    "\n",
    "# 画图看各个特征的重要程度\n",
    "plt.bar(range(len(predictors)), scores)\n",
    "plt.xticks(range(len(predictors)), predictors, rotation='vertical')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8305274971941637\n"
     ]
    }
   ],
   "source": [
    "predictors = [\"Pclass\", \"Sex\", \"Age\", \"SibSp\", \"Fare\",\"Parch\", \"Embarked\", \n",
    "\"FamilyLabel\", \"TicketGroup\", \"Title\",\"Deck_Group\"]\n",
    "\n",
    "alg = RandomForestClassifier(random_state = 10, warm_start = True, \n",
    "                                  n_estimators = 26,\n",
    "                                  max_depth = 6, \n",
    "                                  max_features = 'sqrt')\n",
    "\n",
    "kf = KFold(n_splits=9,random_state=1)\n",
    "\n",
    "scores = cross_val_score(alg, train[predictors], train[\"Survived\"], cv=kf)\n",
    "print(scores.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8529741863075196\n"
     ]
    }
   ],
   "source": [
    "algorithms = [\n",
    "    [RandomForestClassifier(random_state = 10, warm_start = True, \n",
    "                                  n_estimators = 26,\n",
    "                                  max_depth = 6, \n",
    "                                  max_features = 'sqrt'),\n",
    "     ['Pclass', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare', 'Embarked', 'FamilyLabel', 'TicketGroup', 'Title','Deck_Group']],\n",
    "    [LogisticRegression(random_state=1),\n",
    "     ['Pclass', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare', 'Embarked', 'FamilyLabel', 'TicketGroup', 'Title','Deck_Group']]\n",
    "]\n",
    "\n",
    "kf = KFold(n_splits=9,random_state=1)\n",
    "predictions = []\n",
    "for train_L, test_L in kf.split(train):\n",
    "    train_target = train['Survived'].iloc[train_L]\n",
    "    full_test_predictions = []\n",
    "    for alg, predictors in algorithms:\n",
    "        alg.fit(train[predictors].iloc[train_L, :], train_target)\n",
    "        test_prediction = alg.predict_proba(train[predictors].iloc[test_L, :].astype(float))[:, 1]\n",
    "        full_test_predictions.append(test_prediction)\n",
    "    test_predictions = (full_test_predictions[0] + full_test_predictions[1]) / 2\n",
    "    test_predictions[test_predictions > .5] = 1\n",
    "    test_predictions[test_predictions <= .5] = 0\n",
    "    predictions.append(test_predictions)\n",
    "predictions = np.concatenate(predictions, axis=0)\n",
    "accuracy = sum(predictions == train['Survived']) / len(predictions)  \n",
    "print(accuracy)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
